project(Programming-Massively-Parallel-Processors-4th)

# 查找 CUDA 工具包
find_package(CUDA REQUIRED)

# 设置 CUDA 编译选项
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3)

# 添加可执行文件
cuda_add_executable(ch02
    Ch02/vector_add.cu
)

# 链接 CUDA 库
target_link_libraries(ch02 ${CUDA_LIBRARIES})